DojoManager.Combat = Ext.extend(Ext.app.Module, {

    getId : function() {
        return 'combat';    
    },

    init : function(){
        this.launcher = {
            text: 'Combattimenti',
            iconCls: 'tabs',
            handler: this.createWindow,
            scope: this
        }
    },

    createWindow : function(){

        var desktop = this.app.getDesktop();
        var win = desktop.getWindow(this.getId());
        if (!win) {
            win = desktop.createWindow({
                id: this.getId(),
                title: 'Combattimenti',
                width: 730,
                height: 400,
                iconCls: 'tabs',
                shim: false,
                layout: 'fit',
                items: {},
                buttons: [
                 {
                    text: 'Close',
                    handler: function() {
                        win.close();
                    }
                 }]
            });
        }

        win.show();
    }
});
